package org.bonorsoft.modules.wechat.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface CodeMapper {

    @Insert("insert into user_enterprise(user_id, enterprise_code) values (#{username}, #{code})")
    int addCode(String username, String code);

    @Select("select enterprise_code from user_enterprise where user_id = #{username}")
    String getCode(String username);

    @Select("select count(1) from user_enterprise where user_id = #{username}")
    int count(String username);


}
